from flask import Flask, render_template
from funciton import get_data


app = Flask(__name__)


@app.route('/')
def entry_page() -> 'html':
    title = '电影数据分析网站'
    data = get_data()
    return render_template('entry.html',
                           the_title=title,
                           the_data=data(classes="male", index=False))

@app.route('/rating')
def rating_page() -> 'html':
    title = '电影数据分析网站'
    # data = rating_data()
    return render_template('rating.html',
                           the_title=title)
                           # the_data=data(classes="male", index=False)


if __name__ == '__main__':
    app.run()
